package com.atguigu.jxc.dao;

import com.atguigu.jxc.entity.Goods;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface GoodsDao {

    List<Goods> selectGoodsList(String codeOrName, Integer goodsTypeId);

    Integer selectTotal(String codeOrName, Integer goodsTypeId);

    void deleteByGoodsTypeId(Integer goodsTypeId);

    List<Goods> selectGoods(String goodsName, Integer goodsTypeId);

    Integer selectGoodsTotal(String goodsName, Integer goodsTypeId);

    List<Goods> selectNoGoodSList(String nameOrCode);

    Integer selectNoTotal(String nameOrCode);

    List<Goods> selectHasGoodSList(String nameOrCode);

    Integer selectHasTotal(String nameOrCode);

    void updateById(@Param("goodsId") Integer goodsId, @Param("inventoryQuantity") Integer inventoryQuantity, @Param("purchasingPrice") double purchasingPrice);

    void updateStock(Integer goodsId);

    List<Goods> selectGoodsAlarmList();


}
